﻿@using ATTools.ViewModels;
@using ATTools.Models;
@using Orchard.Utility.Extensions;
@{
    Layout.Title = T("New Voice Command");
}

<div>
    @Display.EditorTemplate(TemplateName: "CreateVoiceCommand", Model: ViewData["CreateVoiceCommand"] != null ? ViewData["CreateVoiceCommand"] : new VoiceCommandsAdminCreateViewModel())
    <h3>@T("Examples:")</h3>
    <h4>@T("Make local searches with your voice:")</h4>
    <pre>@T("Activation string:") <strong>@T("Search for")</strong>    |    @T("Type of execution:") <strong>@CommandType.GoToUrl.ToString()</strong>    |    @T("Execution data:") <strong>/Search?q={value}</strong></pre>
    <br />
    <h4>@T("Make global searches with your voice:")</h4>
    <pre>@T("Activation string:") <strong>@T("Google")</strong>    |    @T("Type of execution:") <strong>@CommandType.GoToUrl.ToString()</strong>    |    @T("Execution data:") <strong>http://www.google.dk/#hl=en&q={value}</strong></pre>
    <br />
    <h4>@T("Play the first audio element on the page:")</h4>
    <pre>@T("Activation string:") <strong>@T("Play")</strong>    |    @T("Type of execution:") <strong>@CommandType.JavaScript.ToString()</strong>    |    @T("Execution data:") <strong>document.getElementsByTagName('audio')[0].play();</strong></pre>
    <br />
    <h4>@T("Pause the first audio element on the page:")</h4>
    <pre>@T("Activation string:") <strong>@T("Stop")</strong>    |    @T("Type of execution:") <strong>@CommandType.JavaScript.ToString()</strong>    |    @T("Execution data:") <strong>document.getElementsByTagName('audio')[0].pause();</strong></pre>
</div>